home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / PublicDomain / Anwendungen / MSCalendar / src.lzh / Src / cal.h < prev    next >
C/C++ Source or Header  |  1991-06-07  |  2KB  |  138 lines

  1. /* Definitions for the Calendar-Program */
  2.  
  3. #include <intuition/intuition.h>            /* Include few headers */
  4. #include <graphics/gfxbase.h>
  5. #include <libraries/dos.h>
  6. #include <workbench/workbench.h>
  7. #include <workbench/startup.h>
  8. #include <exec/memory.h>
  9. #include <exec/types.h>
  10. #include <devices/console.h>
  11. #include <stdio.h>
  12. #include <time.h>
  13.  
  14. #include <clib/alib_protos.h>
  15. #include <clib/intuition_protos.h>
  16. #include <clib/graphics_protos.h>
  17. #include <clib/dos_protos.h>
  18. #include <clib/exec_protos.h>
  19. #include <clib/icon_protos.h>
  20. #include <clib/console_protos.h>
  21.  
  22. #define RELEASE 1
  23. #define REVISION 10
  24.  
  25. #ifdef GERMAN
  26. #define WINTITLE "MS-Calendar 1.10 German"
  27. #define WEEKDAYS "Mon Die Mit Don Fre Sam Son"
  28. #else
  29. #define WEEKDAYS "Mon Tue Wed Thu Fri Sat Sun"
  30. #define WINTITLE "MS-Calendar 1.10"
  31. #endif
  32. #define WEEKDAYLENGTH strlen(WEEKDAYS)
  33.  
  34. #define SHIFT  0x8002
  35. #define SHIFTR 0x8202
  36. #define RIGHT  0x4E
  37. #define LEFT   0x4F
  38. #define UP     0x4C
  39. #define DOWN   0x4D
  40.  
  41. typedef struct IntuitionBase IBASE;
  42. typedef struct GfxBase       GFXBASE;
  43. typedef struct Window        WIN;
  44. typedef struct Screen        SCR;
  45. typedef struct RastPort      RPORT;
  46. typedef struct tm            TM;
  47. typedef struct IntuiMessage  IMSG;
  48. typedef struct Message       MSG;
  49. typedef struct MsgPort       MSGP;
  50. typedef struct TextFont      TF;
  51. typedef struct timerequest   TR;
  52. typedef struct IORequest     IOR;
  53.  
  54. struct Date
  55. {
  56.   int d,m,y;
  57. };
  58.  
  59. struct Calendar
  60. {
  61.   struct Date cald;
  62.   BOOL        Iconify;
  63.   BOOL        Beep;
  64.   BOOL        Front;
  65.   UWORD       xpos,ypos;
  66.   UWORD       height,width;
  67.   UWORD       ixpos,iypos;
  68.   UWORD       iheight,iwidth;
  69.   WIN         *calwin;
  70.   RPORT       *rp;
  71. };
  72.  
  73. typedef struct Calendar      CAL;
  74.  
  75. struct Gadget todayswitch =
  76. {
  77.   NULL,
  78.   0,0,
  79.   0,0,
  80.   GADGHCOMP,
  81.   GADGIMMEDIATE|
  82.   RELVERIFY,
  83.   BOOLGADGET,
  84.   NULL,
  85.   NULL,
  86.   NULL,
  87.   NULL,
  88.   NULL,
  89.   0,
  90.   NULL
  91. };
  92.  
  93. struct NewWindow calwin_data =
  94. {
  95.   0,0,
  96.   0,0,
  97.   0,1,
  98.   CLOSEWINDOW|        /* IDCMP */
  99.   MOUSEBUTTONS|
  100.   GADGETUP|
  101.   GADGETDOWN,
  102.   SMART_REFRESH|      /* Flags */
  103.   RMBTRAP|
  104.   NOCAREREFRESH|
  105.   WINDOWCLOSE|
  106.   WINDOWDRAG|
  107.   WINDOWDEPTH,
  108.   &todayswitch,
  109.   NULL,
  110.   (UBYTE *) WINTITLE, /* Title Title of the window. */
  111.   NULL,
  112.   NULL,
  113.   20,10,
  114.   640,
  115.   200,
  116.   WBENCHSCREEN
  117. };
  118.  
  119. SHORT boxdata[] =
  120. {
  121.   0,0,
  122.   22,0,
  123.   22,12,
  124.   0,12,
  125.   0,0
  126. };
  127.  
  128. struct Border dayborder =
  129. {
  130.   0,0,
  131.   0,1,
  132.   JAM1,
  133.   5,
  134.   boxdata,
  135.   NULL
  136. };
  137.  
  138.